home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / Libraries / Activation / Focus.h < prev    next >
Text File  |  1997-06-28  |  749b  |  48 lines

  1. // Focus.h
  2.  
  3. #ifndef Focus_h
  4. #define Focus_h
  5.  
  6. #ifndef ListOf_h
  7. #include "ListOf.h"
  8. #endif
  9.  
  10. class Focus
  11.   {
  12.     friend class RootFocus;
  13.     friend class Activator;
  14.     
  15.     private:
  16.         ListOf< Activator > activators;
  17.         Focus *const parent;
  18.         Focus *favoredChild;
  19.         uint32 children;
  20.         bool active;
  21.         
  22.         Focus();
  23.         
  24.         void Activate();
  25.         void Deactivate();
  26.         
  27.         // not implemented:
  28.             Focus( const Focus& );
  29.             void operator=( const Focus& );
  30.         
  31.     public:
  32.         Focus( Below, Focus& parent );
  33.         ~Focus();
  34.         
  35.         Focus *Parent() const                { return parent; }
  36.         
  37.         bool Active() const                    { return active; }
  38.         
  39.         Focus *FavoredChild() const        { return favoredChild; }
  40.         void FavorChild( Focus& );
  41.         void FavorNoChild();
  42.         
  43.         void BeFavored();
  44.         void BeDisfavored();
  45.   };
  46.  
  47. #endif
  48.